<?php

/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/8/21
 * Time: 18:40
 */
class 获取两个时间相差的年数月数和天数
{

}
//Get detail gap of year,month and days between two different time by vfhky 20130728
$common = (time()-strtotime(get_option('swt_builddate')));
$a = floor($common/86400/360);    //整数年
$b = floor($common/86400/30) - $a*12; //整数月
$c = floor($common/86400) - $a*360 - $b*30;   //整数日
$d = floor($common/86400);    //总的天数
echo $a."年".$b."月".$c."日（共计".$d."天）";